package com.ev.mes.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * BOM的信息
 *
 */
@Data
@ApiModel(value = "BOM的信息")
public class BomDO2 implements Serializable {
	private static final long serialVersionUID = 1L;

	@ApiModelProperty()
	private Long id;

	@ApiModelProperty(value = "BOM名称", required = true)
	private String name;

	@ApiModelProperty(value = "BOM对应的物料id")
	private Long materielId;

	@ApiModelProperty(value = "子BOM名称")
	private Long childMaterielId;

	@ApiModelProperty(value = "子BOM对应的物料id", required = true)
	private String childMaterielName;

	@ApiModelProperty(value = "子BOM对应的物料规格型号", required = true)
	private String childMaterielSpecification;

	@ApiModelProperty(value = "子BOM基本单位用量", required = true)
	private BigDecimal standardCount;

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof BomDO2) {
			return (this.getChildMaterielName().equals(((BomDO2)obj).getChildMaterielName()));
		}else {
			return false;
		}
	}
}
